Hi Everybody
I'm playing a role as a Doors Database Manager, and now I'm facing a problem which can be described as follows:
My aim is to show a "infoBox" which contains some message to everyone who use a Doors client to log in my Database after they open a specific module, also, I want to cancel the "infoBox" at ease, without disturb anyone.
My way to write a DXL script like this:
The code to install Trigger
trigger("AA", module->formal->"SpecificModule", post, open, 10,
"infoBox \"Please do sth\"")
to save it as a dxl file in DOORS home /lib/dxl/example/TipShow.dxl
Then, I open the "SpecificModule", and run the dxl code.
The code to cancel Trigger
delete("AA", module->formal->"SpecificModule", post, open, 10)
also, save it as a dxl file in DOORS home /lib/dxl/example/TipCancel.dxl
Then I run the TipShow.dxl, the current situation is it can works correctly on my PC no matter who log in the Database, however, the infoBox couldn't display on other PC, I can realize it because the code is just locate on my PC.
My question is where should I put the code or the file to achieve my aim which described above.
Should I place it to some specific path on the Doors Sever's ?
Much thanks, and looking for your help.
Sincerely, Aven
Aven_HIT - Thu Dec 03 01:51:22 EST 2009 |
|
Re: where should I put this DXL code Mathias Mamsch - Thu Dec 03 09:36:46 EST 2009
Hey Aven, you should put the DXL code of the file directly into the trigger, instead of putting it in a file and then use "#include <...>" as your trigger code.
In the trigger installation code you can just read the file from disk and put it to your trigger.
Regards, Mathias
|
|
Re: where should I put this DXL code Aven_HIT - Mon Dec 07 09:14:40 EST 2009 Mathias Mamsch - Thu Dec 03 09:36:46 EST 2009
Hey Aven, you should put the DXL code of the file directly into the trigger, instead of putting it in a file and then use "#include <...>" as your trigger code.
In the trigger installation code you can just read the file from disk and put it to your trigger.
Regards, Mathias
Many thanks for your kindly help, however, I didn't get your mean clearly
You mean I should put the DXL file in which directory? in my local PC, I didn't find a directory which name is "trigger"
My Doors version is 8.2
I didn't use #include<...> to use my DXL file, instead, after I save it in the directory, I open the module which I want to see the "infoBox", then I click "Tools" -> "Edit DXL" -> "Browse" -> "Some example programs which illustrate various DXL features", find my file, and click "Run". When I open the specific module again after I close it, the two files which show and delete the "infoBox", can work correctly on my local PC.
Then the problem comes, if I want everyone who login my database and open the specific module to see the "infoBox", where should I put the DXL file, or some way else works easier.
Looking forward for your help.
Best wishes, Aven
|
|
Re: where should I put this DXL code llandale - Mon Dec 07 17:52:03 EST 2009
I don't see the problem. Your simple code is stored in the Trigger, and once there should run on the other PCs. It doesn't matter where you store the deploy and delete code. Putting DXL on the DOORS server doesn't do any good, unless folks can see the DOORS server file system with Windows Explorer.
I see that your code stores the trigger in the current Project, and only when that module is in the project root folder, and only when you are running from the project root folder.
If you deploy to the Project and the tester already has the Project open, they won't see the trigger ..err.. right away. Have them log in after you deploy the trigger to that project.
The other guy isn't running with -T command line switch, triggers off?
Its easier if you put the Deploy and Delete code in the same file:
if (confirm("Delete Trigger?")) //-
then delete("AA", module->formal->"SpecificModule", post, open, 10)
if (confirm("Deploy Trigger?")) //-
then trigger("AA", module->formal->"SpecificModule", post, open, 10, "infoBox \"Please do sth\"")
be sure to delete the trigger using the code, before you modify the parameters of the trigger (other than the DXL code): Delete the trigger, rename it to "AnotherModule", re-deploy it.
|
|
Re: where should I put this DXL code Aven_HIT - Wed Dec 09 21:16:36 EST 2009 llandale - Mon Dec 07 17:52:03 EST 2009
I don't see the problem. Your simple code is stored in the Trigger, and once there should run on the other PCs. It doesn't matter where you store the deploy and delete code. Putting DXL on the DOORS server doesn't do any good, unless folks can see the DOORS server file system with Windows Explorer.
I see that your code stores the trigger in the current Project, and only when that module is in the project root folder, and only when you are running from the project root folder.
If you deploy to the Project and the tester already has the Project open, they won't see the trigger ..err.. right away. Have them log in after you deploy the trigger to that project.
The other guy isn't running with -T command line switch, triggers off?
Its easier if you put the Deploy and Delete code in the same file:
if (confirm("Delete Trigger?")) //-
then delete("AA", module->formal->"SpecificModule", post, open, 10)
if (confirm("Deploy Trigger?")) //-
then trigger("AA", module->formal->"SpecificModule", post, open, 10, "infoBox \"Please do sth\"")
be sure to delete the trigger using the code, before you modify the parameters of the trigger (other than the DXL code): Delete the trigger, rename it to "AnotherModule", re-deploy it.
Hey llandale
I'm a beginner in Doors and DXL, and didn't get "-T command line switch" meaning, in which way does it works.
It's greatest to you to give me some more explains, many thanks and looking forward!
Regards, Aven
|
|
Re: where should I put this DXL code Aven_HIT - Thu Dec 10 07:48:05 EST 2009 llandale - Mon Dec 07 17:52:03 EST 2009
I don't see the problem. Your simple code is stored in the Trigger, and once there should run on the other PCs. It doesn't matter where you store the deploy and delete code. Putting DXL on the DOORS server doesn't do any good, unless folks can see the DOORS server file system with Windows Explorer.
I see that your code stores the trigger in the current Project, and only when that module is in the project root folder, and only when you are running from the project root folder.
If you deploy to the Project and the tester already has the Project open, they won't see the trigger ..err.. right away. Have them log in after you deploy the trigger to that project.
The other guy isn't running with -T command line switch, triggers off?
Its easier if you put the Deploy and Delete code in the same file:
if (confirm("Delete Trigger?")) //-
then delete("AA", module->formal->"SpecificModule", post, open, 10)
if (confirm("Deploy Trigger?")) //-
then trigger("AA", module->formal->"SpecificModule", post, open, 10, "infoBox \"Please do sth\"")
be sure to delete the trigger using the code, before you modify the parameters of the trigger (other than the DXL code): Delete the trigger, rename it to "AnotherModule", re-deploy it.
Hey, llandale
I get your means, get a correctly comprehension on trigger, thank you very much for your attention on my problem such a long time.
Best regards, Aven
|
|
Re: where should I put this DXL code Calvo, Raphael - Tue Jan 12 14:58:45 EST 2010
A simple solution using <include...> is to place the dxl in a shared directory/folder where all the clients, whithin your project, have access rights.
In this way, anytime you update the dxl script in the shared folder, every client is updated.
You also don't need to re-run the trigger declaration.
|
|
Re: where should I put this DXL code llandale - Tue Jan 12 17:13:07 EST 2010 Calvo, Raphael - Tue Jan 12 14:58:45 EST 2010
A simple solution using <include...> is to place the dxl in a shared directory/folder where all the clients, whithin your project, have access rights.
In this way, anytime you update the dxl script in the shared folder, every client is updated.
You also don't need to re-run the trigger declaration.
Yes, but there's a pretty big difference in deploying DXL when not all the clients have access to the same network resources.
|
|
Re: where should I put this DXL code lahines - Wed Sep 14 14:56:02 EDT 2011
I have a similar problem, Where is the trigger stored? How is a trigger called? If I want to initiate a trigger when a module is opened, is it a module attribute? There is just no information on this detail.
|
|
Re: where should I put this DXL code llandale - Wed Sep 14 15:15:07 EDT 2011 lahines - Wed Sep 14 14:56:02 EDT 2011
I have a similar problem, Where is the trigger stored? How is a trigger called? If I want to initiate a trigger when a module is opened, is it a module attribute? There is just no information on this detail.
While its a Trigger its stored in the Module/Project/Database depending on its scope-level. the standard GUI has no mechanism for finding and displaying Triggers.
The code you use to deploy/undeploy the trigger is just a DXL file and is stored as others. If the trigger code consists of an #include file, then you have deployment problems in distributed systems, but if you read the code into your deploy code and then define the Trigger with that, you won't have the distributed problem since the code for the trigger is stored in the database.
|
|